OTIoctl
Sends a module-specific command to an Open Transport protocol module.C INTERFACE
SInt32 OTIoctl(ProviderRef ref, UInt32 cmd, void* data);C++ INTERFACE
SInt32 TProvider::Ioctl(UInt32 cmd, void* data);PARAMETERS
ref
- The provider reference of the provider affected by the specified command.
cmd
- A routine selector for the module-specific command.
data
- Data to be used by the module-specific command, or a pointer to such data. The interpretation of the
data
parameter is command specific.DESCRIPTION
TheOTIoctl
function sends a module-specific command to an Open Transport protocol module. TheOTIoctl
function runs synchronously or asynchronously, matching the provider's mode of execution.If the
OTIoctl
function completes synchronously without error, it returns 0 or a positive integer. The positive integer's meaning is command specific. If theOTIoctl
function fails while executing synchronously, its return value is a negative integer corresponding to an Open Transport result code.If the
OTIoctl
function runs asynchronously, it returns immediately with a return valuekOTNoError
or another Open Transport result code. When the function completes execution, Open Transport calls the notifier function you specify, passing the event codekStreamIoctlEvent
and aresult
parameter indicating the result of the completedOTIoctl
function. If the value of theresult
parameter is greater than 0, the corresponding result code is defined by the command; otherwise, the value of theresult
parameter corresponds to an Open Transport result code.SPECIAL CONSIDERATIONS
Using theOTIoctl
function makes your application module dependent; you should not use theOTIoctl
function if you want your application to be transport independent.SEE ALSO
Positive return values for theOTIoctl
function are defined by the Open Transport module that you are using. Refer to the documentation for that module for information.